<template>
  <div class="app-container">
    <div class="container-bg">
      <el-tabs class="config_box" v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="识别模式" name="authAggregate">
          <auth-aggregate
            v-if="activeName == 'authAggregate'"
          ></auth-aggregate>
        </el-tab-pane>
        <el-tab-pane label="识别参数" name="distinguishConfig">
          <distinguish-config
            v-if="activeName == 'distinguishConfig'"
          ></distinguish-config>
        </el-tab-pane>
        <el-tab-pane label="注册参数" name="registerConfig" v-if="false">
          <register-config
            v-if="activeName == 'registerConfig'"
          ></register-config>
        </el-tab-pane>
        <el-tab-pane label="抓拍参数" name="cameraConfig">
          <camera-config v-if="activeName == 'cameraConfig'"></camera-config>
        </el-tab-pane>
        <el-tab-pane label="门禁控制" name="cloudGate">
          <cloud-gate v-if="activeName == 'cloudGate'"></cloud-gate>
        </el-tab-pane>
        <el-tab-pane label="GPS信息" name="gpsInfo" v-if="false">
          <gps-info v-if="activeName == 'gpsInfo'"></gps-info>
        </el-tab-pane>
        <el-tab-pane  label="门禁密码" name="cloudGatePassword">
          <cloud-gate-password
            v-if="activeName == 'cloudGatePassword'"
          ></cloud-gate-password>
        </el-tab-pane>
        <el-tab-pane label="终端UI" name="terminalui">
          <terminalui v-if="activeName == 'terminalui'"></terminalui>
        </el-tab-pane>
        <el-tab-pane label="通行策略" name="accessStrategy">
          <access-strategy
            v-if="activeName == 'accessStrategy'"
          ></access-strategy>
        </el-tab-pane>
        <el-tab-pane label="广告策略" name="advertisingStrategy">
          <advertising-strategy
            v-if="activeName == 'advertisingStrategy'"
          ></advertising-strategy>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import authAggregate from "./sub/authAggregate.vue";
import distinguishConfig from "./sub/distinguishConfig.vue";
import cameraConfig from "./sub/cameraConfig.vue";
import cloudGate from "./sub/cloudGate.vue";
import gpsInfo from "./sub/gpsInfo.vue";
import cloudGatePassword from "./sub/cloudGatePassword.vue";
import terminalui from "./sub/terminalui.vue";
import advertisingStrategy from "./sub/advertisingStrategy.vue";
import accessStrategy from "./sub/accessStrategy/index.vue";
import registerConfig from "./sub/registerConfig.vue";
import {getDeviceInfoDetailsApi} from "@/api/network";

export default {
  components: {
    authAggregate,
    distinguishConfig,
    cameraConfig,
    cloudGate,
    gpsInfo,
    cloudGatePassword,
    terminalui,
    advertisingStrategy,
    accessStrategy,
    registerConfig,
  },
  data() {
    return {
      activeName: "authAggregate",
      isPalmVein: false
    };
  },
  created() {
    this.init()
  },
  methods: {
    handleClick() {
    },
    init() {
      getDeviceInfoDetailsApi().then(res => {
        // console.log('get',res.deviceType.deviceType.value)
        if (res.deviceType.deviceType.value == "PalmVein") {
          console.log("PalmVein")
          this.isPalmVein = true
        }
      })
    },
  },
};
</script>

<style lang="scss" scoped>
/deep/ .el-tabs__header {
  margin: 0 0 30px;
}
</style>
